package com.skt.exception;

import lombok.Getter;

@Getter
public enum BaseErrorCode implements ErrorCode {
    
    // ========== 系统通用错误 (1xxx) ==========
    SUCCESS(0, "成功"),
    SYSTEM_ERROR(1001, "系统内部错误"),
    SERVICE_UNAVAILABLE(1002, "服务暂不可用"),
    DATABASE_ERROR(1003, "数据库操作异常"),
    REDIS_ERROR(1004, "缓存服务异常"),
    NETWORK_ERROR(1005, "网络连接异常"),
    
    // ========== 通用业务错误 (3xxx) ==========
    OPERATION_FAILED(3001, "操作失败"),
    DATA_NOT_FOUND(3002, "数据不存在"),
    DATA_EXISTS(3003, "数据已存在"),
    PERMISSION_DENIED(3004, "权限不足"),
    OPERATION_FREQUENT(3005, "操作过于频繁");

    private final int code;
    private final String message;

    BaseErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}